<:#288,9360><:f240,2CG Times (W1),0,0,0>FUNCTION MMWorks ()
@Normal@<:#288,9360><:f240,2CG Times (W1),0,0,0> 'Check to make sure we can create a frame!
@Normal@<:#288,9360><:f240,2CG Times (W1),0,0,0>
@Normal@<:#288,9360><:f240,2CG Times (W1),0,0,0> l_file = ""
@Normal@<:#288,9360><:f240,2CG Times (W1),0,0,0> l_status = 1
@Normal@<:#288,9360><:f240,2CG Times (W1),0,0,0> WHILE (l_status = 1)
@Normal@<:#288,9360><:f240,2CG Times (W1),0,0,0> l_dlg = DialogBox (".", "LnlFile")<:f>
@Normal@<:#288,9360><:f240,2CG Times (W1),0,0,0> SWITCH l_dlg
@Normal@<:#288,9360><:f240,2CG Times (W1),0,0,0> case (0)
@Normal@<:#288,9360><:f240,2CG Times (W1),0,0,0> l_file = ""
@Normal@<:#288,9360><:f240,2CG Times (W1),0,0,0> l_status = 0
@Normal@<:#288,9360><:f240,2CG Times (W1),0,0,0> case (1)
@Normal@<:#288,9360><:f240,2CG Times (W1),0,0,0> l_file = GetDialogField$ (8000)
@Normal@<:#288,9360><:f240,2CG Times (W1),0,0,0> IF l_file = ""
@Normal@<:#288,9360><:f240,2CG Times (W1),0,0,0> MESSAGE ("Invalid filename!")
@Normal@<:#288,9360><:f240,2CG Times (W1),0,0,0> ELSE
@Normal@<:#288,9360><:f240,2CG Times (W1),0,0,0> l_status = 0
@Normal@<:#288,9360><:f240,2CG Times (W1),0,0,0> ENDIF
@Normal@<:#288,9360><:f240,2CG Times (W1),0,0,0> case (4)
@Normal@<:#288,9360><:f240,2CG Times (W1),0,0,0>' l_id = DLLLocate ("USER","AnsiLower","CC")
@Normal@<:#288,9360><:f240,2CG Times (W1),0,0,0>' MESSAGE(l_id)
@Normal@<:#288,9360><:f240,2CG Times (W1),0,0,0>' MESSAGE (strcat$ ("HELP!!!",DLLCall (l_id, "test")))
@Normal@<:#576,9360><:f240,2CG Times (W1),0,0,0> l_id_fopen = DLLLocate ("LNL_MACS.DLL", "LnlFOpen", "FC")
@Normal@<:#288,9360><:f240,2CG Times (W1),0,0,0> IF l_id_fopen = 0
@Normal@<:#576,9360><:f240,2CG Times (W1),0,0,0> IF (DLLLoadLib ("LNL_MACS.DLL", "LnlFOpen", "FC") = 0)
@Normal@<:#576,9360><:f240,2CG Times (W1),0,0,0> MESSAGE<:f><:f240,2CG Times (W1),0,0,0>("Could not load LNL_MACS.DLL! Make sure it is in your windows directory!")<:f>
@Normal@<:#288,9360><:f240,2CG Times (W1),0,0,0> EXIT FUNCTION
@Normal@<:#288,9360><:f240,2CG Times (W1),0,0,0> ELSE
@Normal@<:#576,9360><:f240,2CG Times (W1),0,0,0> l_id_fopen = DLLLocate ("LNL_MACS.DLL", "LnlFOpen", "FC")
@Normal@<:#288,9360><:f240,2CG Times (W1),0,0,0> IF l_id_fopen= 0
@Normal@<:#576,9360><:f240,2CG Times (W1),0,0,0> MESSAGE("DLL Loaded but can not locate LNLFOPEN function!")
@Normal@<:#288,9360><:f240,2CG Times (W1),0,0,0> EXIT FUNCTION<:f>
@Normal@<:#288,9360><:f240,2CG Times (W1),0,0,0> ENDIF
@Normal@<:#288,9360><:f240,2CG Times (W1),0,0,0> ENDIF
@Normal@<:#288,9360><:f240,2CG Times (W1),0,0,0> ENDIF<:f>
@Normal@<:#288,9360><:f240,2CG Times (W1),0,0,0> l_file = <:f><:f240,2CG Times (W1),0,0,0>DLLCall (l_id_fopen, "TEST"<:f><:f240,2CG Times (W1),0,0,0>)
@Normal@<:#288,9360><:f240,2CG Times (W1),0,0,0> IF l_file <<<;> ""<:f>
@Normal@<:#288,9360><:f240,2CG Times (W1),0,0,0> FillEdit (8000, l_file)<:f>
@Normal@<:#288,9360><:f240,2CG Times (W1),0,0,0> ENDIF
@Normal@<:#288,9360><:f240,2CG Times (W1),0,0,0> default
@Normal@<:#288,9360><:f240,2CG Times (W1),0,0,0> Message ("Internal error - wrong return value from dialog box")
@Normal@<:#288,9360><:f240,2CG Times (W1),0,0,0> EXIT FUNCTION
@Normal@<:#288,9360><:f240,2CG Times (W1),0,0,0> ENDSWITCH
@Normal@<:#288,9360><:f240,2CG Times (W1),0,0,0> WEND
@Normal@'l_file = "<:f240,2CG Times (W1),0,0,0>R:\USR\ANIM\CAR.MOV<:f>"
@Normal@<:#288,9360><:f240,2CG Times (W1),0,0,0> IF l_file != ""
@Normal@<:#288,9360><:f240,2CG Times (W1),0,0,0> l_mode = GetMode ()
@Normal@<:#288,9360><:f240,2CG Times (W1),0,0,0> IF l_mode != 1
@Normal@<:#288,9360><:f240,2CG Times (W1),0,0,0> LayoutMode ()<:f>
@Normal@<:#288,9360><:f240,2CG Times (W1),0,0,0> ENDIF
@Normal@<:#288,9360><:f240,2CG Times (W1),0,0,0> l_pos = CursorPosition$ ()
@Normal@<:#288,9360><:f240,2CG Times (W1),0,0,0> l_x = strfield$ (l_pos, 1, ",")
@Normal@<:#288,9360><:f240,2CG Times (W1),0,0,0> l_y = strfield$ (l_pos, 2, ",")
@Normal@<:#288,9360><:f240,2CG Times (W1),0,0,0> l_x2 = l_x + 1440
@Normal@<:#288,9360><:f240,2CG Times (W1),0,0,0> l_y2 = l_y + 1440
@Normal@<:#288,9360><:f240,2CG Times (W1),0,0,0> AddFrame (l_x, l_y, l_x2, l_y2)
@Normal@<:#288,9360><:f240,2CG Times (W1),0,0,0> FrameModInit ()
@Normal@<:#576,9360><:f240,2CG Times (W1),0,0,0> FrameModType (Opaque+Borders+RunMacro, 0, strcat$("mmworks.smm!PlayMM(<:f><:f240,2CG Times (W1),0,0,0>", l_file, ")"))
@Normal@<:#288,9360><:f240,2CG Times (W1),0,0,0> FrameModFinish()
@Normal@<:#288,9360><:f240,2CG Times (W1),0,0,0> ENDIF<:f>
<:#288,9360><:f240,2CG Times (W1),0,0,0>END FUNCTION
<:#288,9360><:f240,2CG Times (W1),0,0,0>
<:#284,9360>FUNCTION LoadMMW()
@Normal@<:#288,9360><:f240,2CG Times (W1),0,0,0> l_id_getmodhndl = <:f><:f240,2CG Times (W1),0,0,0>DLLLocate ("KERNEL<:f><:f240,2CG Times (W1),0,0,0>", "GetModuleHandle", "IC")<:f>
@Normal@<:#288,9360><:f240,2CG Times (W1),0,0,0> IF l_id_getmodhndl = 0
@Normal@<:#288,9360><:f240,2CG Times (W1),0,0,0> MESSAGE ("Can not locate 'GetModuleHandle' function. Abort!")
@Normal@<:#288,9360><:f240,2CG Times (W1),0,0,0> RETURN (0)<:f>
@Normal@<:#288,9360><:f240,2CG Times (W1),0,0,0> ENDIF
@Normal@<:#288,9360><:f240,2CG Times (W1),0,0,0>
@Normal@<:#288,9360><:f240,2CG Times (W1),0,0,0> l_id_load = DLLLocate ("LNL_MACS.DLL", "LnlLoad", "II")
@Normal@<:#288,9360><:f240,2CG Times (W1),0,0,0> IF l_id_load = 0
@Normal@<:#288,9360><:f240,2CG Times (W1),0,0,0> IF (DLLLoadLib ("LNL_MACS.DLL", "LnlLoad", "II") = 0)
@Normal@<:#576,9360><:f240,2CG Times (W1),0,0,0> MESSAGE<:f><:f240,2CG Times (W1),0,0,0>("Could not load LNL_MACS.DLL! Make sure it is in your windows directory!")<:f>
@Normal@<:#288,9360><:f240,2CG Times (W1),0,0,0> RETURN (0)<:f>
@Normal@<:#288,9360><:f240,2CG Times (W1),0,0,0> ELSE
@Normal@<:#288,9360><:f240,2CG Times (W1),0,0,0> l_id_load = DLLLocate ("LNL_MACS.DLL", "LnlLoad", "II")
@Normal@<:#288,9360><:f240,2CG Times (W1),0,0,0> IF l_id_load = 0
@Normal@<:#576,9360><:f240,2CG Times (W1),0,0,0> MESSAGE("DLL Loaded but can not locate LNLLOAD function!")
@Normal@<:#288,9360><:f240,2CG Times (W1),0,0,0> RETURN (0)<:f>
@Normal@<:#288,9360><:f240,2CG Times (W1),0,0,0> ENDIF
@Normal@<:#288,9360><:f240,2CG Times (W1),0,0,0> ENDIF
@Normal@<:#288,9360><:f240,2CG Times (W1),0,0,0> ENDIF
@Normal@<:#288,9360><:f240,2CG Times (W1),0,0,0>
@Normal@<:#288,9360><:f240,2CG Times (W1),0,0,0> l_err = 0
@Normal@<:#288,9360><:f240,2CG Times (W1),0,0,0> IF DLLCall (l_id_getmodhndl, "MMWORKS") = 0<:f>
@Normal@<:#288,9360><:f240,2CG Times (W1),0,0,0> l_err = DLLCall (l_id_load, 0)<:f>
@Normal@<:#288,9360><:f240,2CG Times (W1),0,0,0> IF l_err <<<;> 0<:f>
@Normal@<:#576,9360><:f240,2CG Times (W1),0,0,0> MESSAGE<:f><:f240,2CG Times (W1),0,0,0>(strcat$ ("MMWORKS could not be loaded! Error-<;>", l_err))
@Normal@<:#288,9360><:f240,2CG Times (W1),0,0,0> RETURN (0)<:f>
@Normal@<:#288,9360><:f240,2CG Times (W1),0,0,0> ENDIF
@Normal@<:#288,9360><:f240,2CG Times (W1),0,0,0> ENDIF<:f>
@Normal@<:#216,9360>
@Normal@<:#216,9360> RETURN(1)
<:#240,9360>END FUNCTION
<:#288,9360><:f240,2CG Times (W1),0,0,0>
<:#288,9360><:f240,2CG Times (W1),0,0,0>FUNCTION PlayMM(p_file)<:f>
<:#288,9360><:f240,2CG Times (W1),0,0,0> IF LoadMMW () = 1
<:#288,9360><:f240,2CG Times (W1),0,0,0> l_err = 0
@Normal@<:#288,9360><:f240,2CG Times (W1),0,0,0> IF l_err = 0<:f>
<:#284,9360><:f240,2Times New Roman,0,0,0> AppMinimize("Multimedia Works")<:f>
@Normal@<:#288,9360><:f240,2CG Times (W1),0,0,0> l_channel = DDEInitiate("LnlServer", "<:f><:f240,2CG Times (W1),0,0,0>System<:f><:f240,2CG Times (W1),0,0,0>")
@Normal@<:#288,9360><:f240,2CG Times (W1),0,0,0> IF l_channel = 0 Then
@Normal@<:#576,9360><:f240,2CG Times (W1),0,0,0> MESSAGE("Problem communicating with Multimedia Works server.")
@Normal@<:#288,9360><:f240,2CG Times (W1),0,0,0> ELSE
@Normal@<:#288,9360><:f240,2CG Times (W1),0,0,0> l_str = strcat$("Open(<:f><:f240,2CG Times (W1),0,0,0>", p_file,
<:f><:f240,2CG Times (W1),0,0,0>")")
@Normal@<:#288,9360><:f240,2CG Times (W1),0,0,0> DDEExecute(l_channel, l_str<:f><:f240,2CG Times (W1),0,0,0>)
@Normal@<:#288,9360><:f240,2CG Times (W1),0,0,0> DDETerminate(l_channel)
@Normal@<:#288,9360><:f240,2CG Times (W1),0,0,0> ENDIF
@Normal@<:#288,9360><:f240,2CG Times (W1),0,0,0> ENDIF
@Normal@<:#288,9360><:f240,2CG Times (W1),0,0,0> ENDIF
<:#288,9360><:f240,2CG Times (W1),0,0,0>END FUNCTION<:f>